﻿using System.Collections.Generic;
using System.Reflection;

namespace NBuild.Fx.Engine
{
    internal sealed class Target
    {
        private readonly MethodInfo _method;
        private readonly TargetAttribute _targetAttribute;
        private readonly List<Target> _dependantTargets = new List<Target>();

        internal Target(MethodInfo method, TargetAttribute targetAttribute)
        {
            _method = method;
            _targetAttribute = targetAttribute;
        }

        internal List<Target> DependantTargets
        {
            get
            {
                return _dependantTargets;
            }
        }

        internal MethodInfo Method
        {
            get
            {
                return _method;
            }
        }

        internal TargetAttribute TargetAttribute
        {
            get
            {
                return _targetAttribute;
            }
        }
    }

    internal sealed class TargetCollection : Dictionary<string, Target>
    {
    }
}